﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MDCAdminTool.Controls
{
    /// <summary>
    /// Interaction logic for NewCacheHostWin.xaml
    /// </summary>
    public partial class NewCacheHostWin : Window
    {
        private bool isReady = false;

        public string HostName { get; set; }
        public int CachePort { get; set; }
        public bool IsReady { get { return isReady; } }

        public NewCacheHostWin()
        {
            InitializeComponent();
        }

        private void Newbtn_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                HostName = tbHostName.Text;
                CachePort = Convert.ToInt16(tbCachePort.Text);
            }
            catch 
            {
                //TODO- add an exception handler
            }

            isReady = true;

            this.Hide();

        }
    }
}
